package com.yunxi.core.web;

public class GlobalException extends RuntimeException{

    private int code = 500;

    public int getCode() {
        return code;
    }

    public GlobalException(String message) {
        super(message);
    }

    public GlobalException(int code, String message) {
        super(message);
        this.code = code;
    }

    @Override
    public String toString() {
        return "GlobalException{" +
            "code='" + code + '\'' +
            ", message='" + getMessage() + '\'' +
            '}';
    }
}
